#include"stdio.h"
main()
{
	int i,j,n;
	double sum,x;
	sum=0;
	printf("Enter n:");
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		x=1;
		for(j=1;j<=i;j++)
			x=x*j;
		sum=sum+x;}
	printf("1!+2!+...+%d!\n=%e\n=%lf\n",n,sum,sum);
	return 0;
}

